package com.study.shengsiyuan.example07;

import com.study.shengsiyuan.example07.gen_java.thrift.DateException;
import com.study.shengsiyuan.example07.gen_java.thrift.Person;
import com.study.shengsiyuan.example07.gen_java.thrift.PersonService;
import org.apache.thrift.TException;

public class PersonServiceImpl implements PersonService.Iface {
    @Override
    public Person getPersonByUsername(String username) throws DateException, TException {
        System.out.println("Get Client Person : "+ username);
        Person p =new Person();
        p.setUsername(username);
        p.setAge(20);
        p.setMarried(false);
        return p;
    }

    @Override
    public void savePerson(Person person) throws DateException, TException {
        System.out.println("Get Client Param : "+ person.toString());
    }
}
